﻿using System.Windows;
using TfsComLib.TfsBranchLib2;

namespace TfsBranchLib2.View
{
    /// <summary>
    ///     Interaction logic for BranchProviderSettingWindow.xaml
    /// </summary>
    public partial class SourceControlBasePathSettingsWindow : Window
    {
        public SourceControlBasePathSettingsWindow()
        {
            InitializeComponent();
        }

        public SourceControlBasePathSettingsWindow(Window owner, ISourceControlBasePath basePath, string message = null)
            : this()
        {
            Owner = owner;
            basePathSettings.Initialize(basePath);
            if (!string.IsNullOrWhiteSpace(message))
            {
                messageBox.Text = message;
                messageBox.Visibility = Visibility.Visible;
            }
        }

        private void OK_Click(object sender, RoutedEventArgs e)
        {
            DialogResult = true;
        }
    }
}